package com.cskaoyan.controller.admin;

import com.cskaoyan.bean.BasePageInfo;
import com.cskaoyan.bean.vo.BaseRespVo;
import com.cskaoyan.bean.MarketLog;
import com.cskaoyan.bean.param.CommonData;
import com.cskaoyan.service.admin.MarketLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Bowen Deng
 * @since 2022/06/26 20:22
 */
@RestController
@RequestMapping("admin/log")
public class AdminLogController {

    @Autowired
    MarketLogService marketLogService;


    /**
     * 这里接收参数的时候需要考虑是否有查询条件
     *
     * @param name
     * @param info
     * @return com.cskaoyan.bean.vo.BaseRespVo
     * @author Bowen Deng
     * @since 2022/06/26 9:26 下午
     */
    @RequestMapping("list")
    public BaseRespVo getLogList(String name, BasePageInfo info) {
        CommonData<MarketLog> list = marketLogService.list(name, info);
        return BaseRespVo.ok(list);
    }
}
